<style>
    .fieldlist dd ins:nth-child(1){width:200px;}
    .fieldlist dd ins:nth-child(2){width:100px;}
    .fieldlist dd ins:nth-child(3){width:100px;}
    .fieldlist dd ins:nth-child(4){width:100px;}
    .fieldlist dd ins:nth-child(5){width:100px;}
    .fieldlist dd input:first-child {width:0;}
</style>
<form id="xinren-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input name="row[id]" type="hidden" value="{$row.id}">
    <div class="form-group row">
        <label class="control-label col-xs-12 col-sm-2">红包配置:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="configTpl" data-name="row[config]">
                <dd>
                    <ins>红包名称</ins>
                    <ins>满</ins>
                    <ins>减</ins>
                    <ins>红包个数</ins>
                    <ins>有效天数</ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a></dd>
                <textarea data-rule="required" name="row[config]" class="form-control hidden" cols="30" rows="5">{$row.config}</textarea>
            </dl>
            <script id="configTpl" type="text/html">
                <dd class="form-inline">
                    <ins><input style="width:180px;" type="text" name="<%=name%>[<%=index%>][name]" class="form-control" value="<%=row.name%>" placeholder="红包名称" size="10"/></ins>
                    <ins><input style="width:80px;" type="text" name="<%=name%>[<%=index%>][reach]" class="form-control" value="<%=row.reach%>" placeholder="满"/></ins>
                    <ins><input style="width:80px;" type="text" name="<%=name%>[<%=index%>][reduce]" class="form-control" value="<%=row.reduce%>" placeholder="减"/></ins>
                    <ins><input style="width:80px;" type="text" name="<%=name%>[<%=index%>][num]" class="form-control" value="<%=row.num%>" placeholder="红包个数"/></ins>
                    <ins><input style="width:80px;" type="text" name="<%=name%>[<%=index%>][days]" class="form-control" value="<%=row.days%>" placeholder="有效天数"/></ins>
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">截止日期:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_date" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[end_date]" type="text" placeholder="不填则一直有效" value="{$row.end_date}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">是否启用:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                <label for="row[status]-0"><input id="row[status]-0" name="row[status]" type="radio" value="0" {if !$row.status}checked{/if} /> 禁用</label>
                <label for="row[status]-1"><input id="row[status]-1" name="row[status]" type="radio" value="1" {if $row.status}checked{/if} /> 启用</label>
            </div>
        </div>
    </div>

    <div class="form-group layer-footer">
        <div class="text-center">
            <button type="submit" class="btn btn-success btn-embossed disabled">提交</button>
            <button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">关闭</button>
        </div>
    </div>
</form>
